<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>登录</title>
    <link rel="stylesheet" href="../frame/layui/css/layui.css">
    <link rel="stylesheet" href="../frame/static/css/style.css">
    <link rel="icon" href="../frame/static/image/code.png">
</head>
<body class="login-body body">

<div class="login-main">
    <header class="layui-elip">企业后台系统</header>
    <form class="layui-form layui-form-pane" method="get" action="">
        
        <div class="layui-form-item">
            <div class="layui-input-inline">
                <input type="text" name="account" class="layui-input" lay-verify="account" placeholder="手机号"  autocomplete="on" maxlength="20"/>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-inline">
                <input type="password" name="password" class="layui-input" lay-verify="password" placeholder="密码"
                       maxlength="20"/>
            </div>
        </div>
        
        <div class="layui-form-item">
            <button type="button" class="layui-btn layui-btn-danger btn-reset" >注册</button>
            <button type="button" class="layui-btn btn-submit layui-btn-primary" lay-submit="" lay-filter="sub" style="width: 270px;">立即登录</button>
            
        </div>
        <p><a href="javascript:;" class="fr" style="color: #666666;">忘记密码？</a></p>
    </form>
</div>

<script type="text/javascript" src="../frame/layui/layui.js"></script>
<script type="text/javascript">
    layui.use(['form', 'layer'], function () {

        // 操作对象
        var form = layui.form
                , layer = layui.layer
                , $ = layui.jquery;

        // 验证
        form.verify({
            account: function (value) {
                if (value == "") {
                    return "请输入手机号";
                }
            },
            password: function (value) {
                if (value == "") {
                    return "请输入密码";
                }
            },
            
        });

        // 提交监听
        form.on('submit(sub)', function (data) {
            window.location.href='../index.html'
        });




     
    })

</script>
</body>
</html>